package asteroids.model.programs.parsing.expressions;

import java.util.Map;

import be.kuleuven.cs.som.annotate.Basic;

import asteroids.model.Ship;
import asteroids.model.programs.parsing.types.*;

/**
 * A class of constant expressions.
 * A constant expression is just a contant.
 * 
 * @author Thijs Dieltjens - Wim Konings
 * @version 2.0
 */
public class ConstantExpr extends NullaryExpression {

	public ConstantExpr(Type value,int line, int column) {
		super(line,column);
		this.value=value;
	}

	private Type value;
	
	@Basic
	public Type getValue(){
		return value;
	}
	@Override
	public Type eval(Ship ship, Map<String, Type> globals) {
		return getValue();
	}
}
